package wiz.client.activities.selectplayers;

import com.google.gwt.place.shared.Place;
import com.google.gwt.place.shared.PlaceTokenizer;

public class SelectPlayersPlace extends Place{

	private final String fGameStateToken;

	public SelectPlayersPlace(String gameStateToken) {
		//game state token can be null, we may never have saved game state by this point
		fGameStateToken = gameStateToken;
	}

	public static class Tokenizer implements PlaceTokenizer<SelectPlayersPlace> {
		@Override
		public String getToken(SelectPlayersPlace place) {
			return place.fGameStateToken;
		}

		@Override
		public SelectPlayersPlace getPlace(String token) {
			return new SelectPlayersPlace(token);
		}
	}

	public String getGameStateToken() {
		return fGameStateToken;
	}
}
